/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package structure;
import java.util.*;
import net.*;

/**
 *
 * @author antonio
 */
public class HashProbabilityHandler {

    private Hashtable hashProbability = new Hashtable();
    private AccessPoint ap;

    public HashProbabilityHandler(AccessPoint ap)
    {
        this.ap = ap;
        this.setTotalSignal();
        this.setHashProbability();
    }

    private void setHashProbability()
    {
        for(int i=0; i<this.ap.getSignal().size(); i++)
            this.hashProbability.put(i, this.ap.getSignal().get(i));
    }

    private void setTotalSignal()
    {
        this.hashProbability.put(100, ap.getTotalSignal());
    }

    public Hashtable getHashProbability()
    {
        return this.hashProbability;
    }

}
